Skip to content

Fix Store LiveView crash on resize and bump to 1.0.1 - #69

Merged
marcosqlbi merged 1 commit into
mainfrom
fix/liveview-store-finalizer
Aug 25, 2026
Merged

Fix Store LiveView crash on resize and bump to 1.0.1#69
marcosqlbi merged 1 commit into
mainfrom
fix/liveview-store-finalizer

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

Store-packaged Graphics Capture objects are apartment-bound. LiveView left frame.Surface, the capture session, and GraphicsCaptureItem for the GC, so IObjectReference.Finalize called Marshal.Release from GC.RunFinalizers. That is the AccessViolationException (Event 1026, 0xC0000005) that closed the Store app a few seconds after resizing a LiveView. The same bits run unpackaged because those RCWs are free-threaded there.

Dispose the WinRT wrappers on the dispatcher that created them, close any pending frame before FramePool.Recreate (which invalidates native frames), and marshal GraphicsCaptureItem.Closed back to the UI thread.

VersionPrefix is 1.0.1 so this can be promoted to the Store. Identity version will be 1.0.1.0.

Verified locally: dotnet build Whiteboard.sln -c Release is clean, Core smoke tests pass. The Store repro is still the packaged identity, so confirmation is a sideloaded MSIX or the 1.0.1 Store build on a machine that crashed on 1.0.0.

Store-packaged Graphics Capture RCWs are apartment-bound. Leaving
frame.Surface, the capture session, and GraphicsCaptureItem for the GC
finalizer called Marshal.Release from GC.RunFinalizers, which is the
AccessViolationException that closed the Store app a few seconds after
resizing a LiveView.

Dispose those WinRT objects on the dispatcher that created them, close
pending frames before FramePool.Recreate, and marshal item.Closed back
to the UI thread. VersionPrefix moves to 1.0.1 so the Store can take
the fix.
@marcosqlbi
marcosqlbi merged commit 9506673 into main Aug 25, 2026
4 checks passed
@marcosqlbi
marcosqlbi deleted the fix/liveview-store-finalizer branch August 25, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant